package com.yuanfeng.job.mapper;

import com.yuanfeng.commoms.dto.goods.PlatFormGoodsStateDTO;
import com.yuanfeng.commoms.vo.base.BaseSysConfigsVO;
import com.yuanfeng.commoms.vo.goods.PlatFormGoodsCatsVO;
import com.yuanfeng.commoms.vo.order.OrderComplaintsVO;
import com.yuanfeng.commoms.vo.payment.CardMemberservicesVO;
import com.yuanfeng.commoms.vo.shop.RetentionShopInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @ClassName RetentionmoneyMapper
 * @Description
 * @Author hyq
 * @Date 2023/9/4 13:20
 * @Version 1.0
 **/
@Mapper
public interface RetentionmoneyMapper {

    /**
     * 查询商家未处理投诉单
     * @param date
     * @return
     */
    List<OrderComplaintsVO> querycomplaintsstatus(@Param("date") Date date);


    /**
     * 发送短信通知
     * @param messageOrderId
     * @param sellerId
     * @param sellerName
     * @param messageType
     * @param messageTitle
     * @param messageContent
     * @param shopId
     * @return
     */
    boolean insertSysMessage(@Param("messageOrderId") String messageOrderId,@Param("sellerId") String sellerId, @Param("sellerName") String sellerName,
                             @Param("messageType") Integer messageType, @Param("messageTitle") String messageTitle
            , @Param("messageContent") String messageContent,@Param("shopId") String shopId);


    /**
     * 商家超时未处理投诉单
     * @return
     */
    List<OrderComplaintsVO> merchantprocessingouttime();


    /**
     * 查询质保金信息
     * @param shopId
     * @return
     */
    RetentionShopInfoVO selectretention(Integer shopId);

    /**
     *修改投诉单赔付状态
     * @param status
     * @param id
     * @return
     */
    Integer updateispay1(@Param("status") Integer status,@Param("id") Integer id);

    /**
     * 修改账户余额
     * @param manageMoney
     * @return
     */
    Integer updateCardMemberDetailPort(Map<String, Object> manageMoney);


    Integer insertDetail(@Param("param") Map<String, Object> map);


    Integer insertConsumeRecordport(Map<String, Object> comRecord);

    /**
     * 更新shopbase表
     * @param map
     * @return
     */
    Integer updateshopbase(@Param("param") Map<Object, Object> map);

    /**
     *查询商家是否产生交易订单
     * @param start
     * @param end
     * @return
     */
    List<Map<String,Object>> selectorder(@Param("starttime") Date start,@Param("endtime") Date end);


    List<BaseSysConfigsVO> selectByConfigType(@Param("configType") String configType);

    /**
     *查询店铺订单商品分类信息
     * @param shopId
     * @param start
     * @param end
     * @return
     */
    List<PlatFormGoodsCatsVO> selectordergoods(@Param("shopId")Integer shopId, @Param("starttime")Date start, @Param("endtime") Date end);

    /**
     * 查看分类父类质保金额度是否为null
     * @param catId
     * @return
     */
    List<Integer>  selectcat(@Param("catId") Integer catId);

    /**
     *
     * @return
     */
    List<RetentionShopInfoVO> selectshopbase();


    CardMemberservicesVO queryCardMemberservicesPort(String userId);

    /**
     * 查询未赔付投诉单
     * @param shopId
     * @return
     */
    List<OrderComplaintsVO> unpaidcomplaints(@Param("shopId") Integer shopId);

    /**
     * 修改投诉单赔付状态
     * @param id
     * @return
     */
    Integer updateispay(@Param("id") Integer id);


    /**
     * 充值记录插入
     * @param map
     * @return
     */
    Integer insertretentionmoney(@Param("param") Map<Object, Object> map);

    /**
     *
     * @param shopId
     * @return
     */
    List<Integer> selectshopgoods(@Param("param")Integer shopId);

    /**
     * 下架店铺商品
     * @param shopId
     * @return
     */
    Integer updateshopgoods(@Param("param")Integer shopId);



    void updateGoodsBaseState(@Param("param") PlatFormGoodsStateDTO param);


    List<Integer> queryIsSupperGoods(@Param("commonId")Integer commonId);


    int cancelDealerGoods(@Param("commonIdList") List<Integer> commonIdList);

    int cancelDealerGoodsBase(@Param("commonIdList") List<Integer> commonIdList);

    int deleteRecordStateBatchAll(@Param("commonIds") List<Integer> commonIds);

    List<Integer> selectshopid(@Param("starttime") Date start,@Param("endtime") Date end);

    void updateFirstRetention(@Param("shopId") Integer shopId);
}
